Optimal. Leaf size=133 \[ \frac {2 a^{3/2} A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {2 a^2 (5 A+4 C) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{5 d}+\frac {2 C (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.15, antiderivative size = 133, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4140, 4002,
4000, 3859, 209, 3877} \begin {gather*} \frac {2 a^{3/2} A \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d}+\frac {2 a^2 (5 A+4 C) \tan (c+d x)}{5 d \sqrt {a \sec (c+d x)+a}}+\frac {2 a C \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{5 d}+\frac {2 C \tan (c+d x) (a \sec (c+d x)+a)^{3/2}}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 3859
Rule 3877
Rule 4000
Rule 4002
Rule 4140
Rubi steps
\begin {align*} \int (a+a \sec (c+d x))^{3/2} \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {2 C (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}+\frac {2 \int (a+a \sec (c+d x))^{3/2} \left (\frac {5 a A}{2}+\frac {3}{2} a C \sec (c+d x)\right ) \, dx}{5 a}\\ &=\frac {2 a C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{5 d}+\frac {2 C (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}+\frac {4 \int \sqrt {a+a \sec (c+d x)} \left (\frac {15 a^2 A}{4}+\frac {3}{4} a^2 (5 A+4 C) \sec (c+d x)\right ) \, dx}{15 a}\\ &=\frac {2 a C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{5 d}+\frac {2 C (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}+(a A) \int \sqrt {a+a \sec (c+d x)} \, dx+\frac {1}{5} (a (5 A+4 C)) \int \sec (c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {2 a^2 (5 A+4 C) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{5 d}+\frac {2 C (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}-\frac {\left (2 a^2 A\right ) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {2 a^{3/2} A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {2 a^2 (5 A+4 C) \tan (c+d x)}{5 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a C \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{5 d}+\frac {2 C (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{5 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.21, size = 122, normalized size = 0.92 \begin {gather*} \frac {a \left (10 A \text {ArcTan}\left (\sqrt {-1+\sec (c+d x)}\right ) \cos ^2(c+d x)+(5 A+8 C+6 C \cos (c+d x)+(5 A+6 C) \cos (2 (c+d x))) \sqrt {-1+\sec (c+d x)}\right ) \sec ^2(c+d x) \sqrt {a (1+\sec (c+d x))} \tan \left (\frac {1}{2} (c+d x)\right )}{5 d \sqrt {-1+\sec (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(329\) vs.
\(2(115)=230\).
time = 11.40, size = 330, normalized size = 2.48
method | result | size |
default | \(-\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (5 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \sqrt {2}+10 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \cos \left (d x +c \right ) \sin \left (d x +c \right ) \sqrt {2}+5 A \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {5}{2}} \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sin \left (d x +c \right )+40 A \left (\cos ^{3}\left (d x +c \right )\right )+48 C \left (\cos ^{3}\left (d x +c \right )\right )-40 A \left (\cos ^{2}\left (d x +c \right )\right )-24 C \left (\cos ^{2}\left (d x +c \right )\right )-16 C \cos \left (d x +c \right )-8 C \right ) a}{20 d \cos \left (d x +c \right )^{2} \sin \left (d x +c \right )}\) | \(330\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.90, size = 346, normalized size = 2.60 \begin {gather*} \left [\frac {5 \, {\left (A a \cos \left (d x + c\right )^{3} + A a \cos \left (d x + c\right )^{2}\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left ({\left (5 \, A + 6 \, C\right )} a \cos \left (d x + c\right )^{2} + 3 \, C a \cos \left (d x + c\right ) + C a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{5 \, {\left (d \cos \left (d x + c\right )^{3} + d \cos \left (d x + c\right )^{2}\right )}}, -\frac {2 \, {\left (5 \, {\left (A a \cos \left (d x + c\right )^{3} + A a \cos \left (d x + c\right )^{2}\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left ({\left (5 \, A + 6 \, C\right )} a \cos \left (d x + c\right )^{2} + 3 \, C a \cos \left (d x + c\right ) + C a\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )\right )}}{5 \, {\left (d \cos \left (d x + c\right )^{3} + d \cos \left (d x + c\right )^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a \left (\sec {\left (c + d x \right )} + 1\right )\right )^{\frac {3}{2}} \left (A + C \sec ^{2}{\left (c + d x \right )}\right )\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 301 vs.
\(2 (115) = 230\).
time = 1.36, size = 301, normalized size = 2.26 \begin {gather*} -\frac {\frac {5 \, A \sqrt {-a} a^{2} \log \left (\frac {{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right ) \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}{{\left | a \right |}} - \frac {2 \, {\left ({\left (\sqrt {2} {\left (5 \, A a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 4 \, C a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 10 \, \sqrt {2} {\left (A a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + C a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 5 \, \sqrt {2} {\left (A a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 2 \, C a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )}\right )} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a\right )}^{2} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}}{5 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________